<template>
  <div class="qrcode-form">
    <add-base-form v-if="opType === '1'">
      <el-form-item :label="$t('Rss地址')">
        <el-input type="textarea"></el-input>
      </el-form-item>
      <el-form-item :label="$t('Rss模板')">
        <el-select>
          <el-option
            v-for="rsstemp in rssTempOpts"
            :key="rsstemp.v"
            :value="rsstemp.v"
            >{{ rsstemp.l }}</el-option>
        </el-select>
      </el-form-item>
      <el-form-item :label="$t('刷新间隔')">
        <el-time-picker>
        </el-time-picker>
      </el-form-item>
    </add-base-form>
    <edit-base-form v-else-if="opType === '2'">
      <el-form-item :label="$t('Rss地址')">
        <el-input type="textarea"></el-input>
      </el-form-item>
      <el-form-item :label="$t('Rss模板')">
        <el-select>
          <el-option
            v-for="rsstemp in rssTempOpts"
            :key="rsstemp.v"
            :value="rsstemp.v"
            >{{ rsstemp.l }}</el-option>
        </el-select>
      </el-form-item>
      <el-form-item :label="$t('刷新间隔')">
        <el-time-picker>
        </el-time-picker>
      </el-form-item>
    </edit-base-form>
  </div>
</template>

<script>
import AddBaseForm from './AddBaseForm'
import EditBaseForm from './EditBaseForm'
export default {
  components: {
    AddBaseForm,
    EditBaseForm
  },
  props: {
    opType: {
      type: String,
      default: '1'
    }
  },
  data() {
    return {
      rssTempOpts: [
        {v: '1', l: '标题+换行'},
        {v: '2', l: '标题(日期)+换行'},
        {v: '3', l: '[分类]标题(日期)+换行'},
        {v: '4', l: '标题+空格(无换行)'},
      ]
    }
  }
}
</script>

<style lang="scss" scoped>

</style>